import React from 'react';
import './index.less';
import {render} from 'ader';
import ContentAction from '@/actions/content.js';
import DragAction from '@/actions/drag';
import LayoutAction from '@/actions/layout';
import BaseCompAction from '@/actions/baseComponent';

export default render({
    models: ['page'],
    actions: {
        contAct: ContentAction,
        drag: DragAction,
        layout: LayoutAction,
        bca: BaseCompAction
    }
})(({props, state, action}) => {
    const {config} = props.page;

    return (
        <div 
            id="showContent"
            className="show-content"
            ref={action.contAct.getContentPos}
            onClick={action.contAct.removeSelected}
        >
            {action.contAct.renderConfig(config)}
        </div>
    );
});